import request from '@/utils/request'

export function getRoles(params) {
  return request({
    url: '/api/sys/role',
    method: 'get',
    params
  })
} 

// 删除
export function delRole(id) {
    return request({
      url: '/api/sys/role/' + id,
      method: 'delete',
    })
  } 

// 添加
export function addRole(data) {
  return request({
    url: '/api/sys/role',
    method: 'post',
    data
  })
}

// 编辑
export function editRole(data) {
  return request({
    url: '/api/sys/role/' + data.id,
    method: 'put',
    data
  })
}

